<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
	<title></title>
</head>
<body>
    <input type="text" id="a" name="">
    <span id="b"></span>
</body>
<script type="text/javascript">
	var obj = {};
	Object.defineProperty(obj,'hello',{
		set: function(newVal) {
			document.getElementById('a').value = newVal;
			document.getElementById('b').innerHTML = newVal;
		}
	});

	document.addEventListener('keyup',function(e) {
		obj.hello = e.target.value;
	});
</script>
</html>